import java.lang.reflect.Array;
import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86138
 * Date: 2024-07-04
 * Time: 12:21
 */
public class Seven {
    public static void main1(String[] args) {
        char [] array1 = new char[3];
        System.out.println(Arrays.toString(array1));
        System.out.println("/u0000");

        /*for (char x:array1) {
            System.out.println(x);
        }*/


    }

    public static void main2(String[] args) {
        int[] array = {5,7,4,8,2,4};
        Arrays.sort(array);
        System.out.println(Arrays.toString(array));

        int [][] array2 = {{1,2,3},{4,5,6}};
        System.out.println(Arrays.deepToString(array2));
    }


    //将数组变为原来的两倍
    public static int[] two(int[] array) {//返回类型是int[]
        for (int i = 0; i < array.length; i++) {
            array[i] = array[i] * 2;
        }
        return array;

    }

    public static void main3(String[] args) {
        int [] array = {1,2,3,4,5};
        String ret = Arrays.toString(two(array));
        System.out.println(Arrays.toString(array));
        System.out.println(ret);

    }


    public static void main(String[] args) {
        int [] array = {1,2,3,4,5};
        for (int i = 0; i < array.length; i++) {
            array[i] = array[i] * 2;

        }

        System.out.println(Arrays.toString(array));
    }
}
